Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / About View Port Objects


The Default View Port Object

When you first create a view port object, you must assign it to a specific view group. Other than that, the view port has these default properties:

When you create a transform object, or if you just use the original default shape when you create a shape object, QuickDraw GX uses the default transform and assigns a default view port to the transform's view port list. That view port is in the onscreen view group and has the default properties just listed. That means that you can simply create a shape object and immediately draw it to the screen, without creating any view port. However, for most application purposes you need to restrict drawing to the interiors of windows. To do that, you can create a view port each time the user opens a window, and then alter the default shape object for each shape type to make sure that it references a transform whose view port list includes that view port or a child view port of it. Alternatively, you can explicitly assign the proper view port to the transform of each shape after the shape is created.

For more information about the onscreen view group, see "Onscreen and Offscreen View Groups" on page 7-29.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996